
<link href="__LIBS__/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">

<!-- 首条公告 -->
<div class="col-md-5 col-lg-5 col-sm-5">
    <div class="box box-danger">
        <div class="box-header with-border">
            <h5 class="box-title">最新公告</h5>
        </div>
        <div class="box-body">
            <table class="bootstrap-table col-sm-5" id="notice_first"></table>
        </div>
    </div>
</div>


<!-- 公告列表 -->
<div class="col-md-3 col-lg-3 col-sm-3">
    <div class="box box-danger">
        <div class="box-header with-border">
            <h5 class="box-title">公告列表</h5>
        </div>
        <div class="box-body">
            <table class="bootstrap-table col-sm-3" id="notice_list"></table>
        </div>
    </div>
</div>
<!--js方式调用数据-->
<script type="text/javascript" src="__LIBS__/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="__LIBS__/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript">
    $('#notice_list').bootstrapTable({
        data: {$data},
        pagination: true,
        dataField: 'total',
        pageList: [10, 20 ,50],
        columns: [
           /* {
                field: 'date',
                title: '日期'
            },*/
            {
                field:'title',
                title:'公告标题',
                formatter:function(value, row){
                    var temp ='<a href="/cms/index/detail?id = '+row.id +'">' + row.title + '</a>';
                    return temp;
                }
            }
        ],
        height: 500,
        search: true,
        showColumns: false, //去掉变换
        showToggle: false,  //去掉表格列的选择
        idFieldId: 'uid',
        clickToSelect: true,
        toolbar: ''
    })
</script>
<script type="text/javascript">
    $('#notice_first').bootstrapTable({
        data: {$data_first},
        pagination: true,
        dataField: 'total',
        pageList: [10, 20 ,50],
        columns: [
            {
                field:'content',
                title:'',
            }
        ],
        height: 500,
        search: true,
        showColumns: false, //去掉变换
        showToggle: false,  //去掉表格列的选择
        idFieldId: 'uid',
        clickToSelect: true,
        toolbar: ''
    })
</script>